package com.cargroup.service;

import com.cargroup.bean.Manager;
import com.cargroup.dao.ManagerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ManagerService {
    @Autowired
    private ManagerMapper managerMapper;

    public Manager getmanager(Integer id) {
        Manager manager = managerMapper.findmanager(id);
        return manager;
    }

    public List<Manager> findAllManager() {
        return managerMapper.findAllManager();
    }

    public void insertManager(Manager manager) {
        managerMapper.insertManager(manager);
    }

    public void editManager(Manager manager) {
        managerMapper.editManager(manager);
    }

    public void deleteManager(Integer id) {
        managerMapper.deleteManager(id);
    }
}
